package models

// 活动会员的活跃日志，包括参与抽奖，注册活动等
type MaLotteryMemberActiveLog struct {
	ID                string `gorm:"primaryKey;column:id;type:bigint unsigned;not null;comment:唯一ID" json:"id" json_old:"ID"`
	CustomerID        string `gorm:"column:customer_id;type:varchar(50);comment:会员ID" json:"customer_id"`
	Phone             string `gorm:"column:phone;type:varchar(30);comment:会员注册手机号" json:"phone"`
	LotteryActivityID string `gorm:"column:lottery_activity_id;type:bigint;not null;comment:活动ID" json:"lottery_activity_id"`
	SalesID           string `gorm:"column:sales_id;type:varchar(50);not null;comment:机器识别码" json:"sales_id"`
	OutTradeNo        string `gorm:"column:out_trade_no;type:varchar(50);not null;comment:抽奖订单号" json:"out_trade_no"`
	LotteryCode       string `gorm:"column:lottery_code;type:varchar(50);comment:参与抽奖号码" json:"lottery_code"`
	Type              int    `gorm:"column:type;tinyint(1);default:null;comment:1-注册会员 2-参与抽奖 3用户访问量（登录算一次） 4用户浏览量（无论是否登录，点击参与按钮都加一）。疑问：访客数与浏览量" json:"type"`
	CreatedDate       string `gorm:"column:created_date;varchar(10);default:null;comment:日期" json:"created_date"`
	CreatedAt         int64  `gorm:"column:created_at;autoCreateTime;type:int;size:64;comment:创建时间" json:"created_at"`
	UpdatedAt         int64  `gorm:"column:updated_at;autoUpdateTime;type:int;size:64;comment:修改时间" json:"updated_at"`
	DeletedAt         int64  `gorm:"column:deleted_at;default:0;type:int;size:64;comment:删除时间" json:"deleted_at"`
}

func (m MaLotteryMemberActiveLog) TableName() string {
	return "ma_lottery_member_active_log"
}
